Prerequisites
- Go 1.25.4 or later
- SSH key pair for host authentication
- Access to a Cloudflare Worker (see Cloudflare Worker setup)
Build from Source
1
Clone the repository
Clone the Duet repository to your local machine:
2
Build the binary
Use the Makefile to build the Go binary:This creates the
duet binary in the bin/ directory.3
Generate SSH host key
Generate an SSH host key for the server:
4
Run the server
Start the Duet server with your configuration:
Configuration
The Duet server accepts the following command-line flags:The
-worker flag is required for AI agent and sandbox features. Without it, only basic SSH pair programming will be available.Development Mode
For local development with a local Cloudflare Worker:1
Start both services
Run the development command to start both the Worker and Go server:This runs:
- Cloudflare Worker on
http://localhost:8788 - Duet Go server on port
2222
2
Connect to the server
Connect using SSH:
Development mode starts the Worker locally but AI inference still happens on Cloudflare’s edge. Sandbox features require a paid Cloudflare plan.
Alternative: Use Remote Worker
To run the Go server locally while using a deployed Worker:Install Globally
To install Duet globally on your system:go install, making it available in your $GOPATH/bin.
Production Considerations
Connecting to Your Server
Once running, users can connect via:your-server.com with your actual domain or IP address, and 2222 with your configured port.